gdk: Move GL context construction to GdkGLContext
authorBenjamin Otte <otte@redhat.com>
Fri, 9 Jul 2021 00:50:32 +0000 (02:50 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Jul 2021 14:27:32 +0000 (16:27 +0200)
commite06e0e855527bb841d45a7597860054675b8b1c5
tree8ee6e109f250a28996486a485d30cdd09ebb0ec3
parent9f1d6e1f4474707aa9931660da6c3154b2281705
gdk: Move GL context construction to GdkGLContext

Now that we have the display's context to hook into, we can use it to
construct other GL contexts and don't need a GdkSurface vfunc anymore.

This has the added benefit that backends can have different GdkGLContext
classes on the display and get new GLContexts generated from them, so
we get multiple GL backend support per GDK backend for free.

I originally wanted to make this a vfunc on GdkGLContextClass, but
it turns out all the abckends would just call g_object_new() anyway.
20 files changed:
gdk/gdkglcontext.c
gdk/gdkglcontextprivate.h
gdk/gdksurface.c
gdk/gdksurfaceprivate.h
gdk/macos/gdkmacosdisplay.c
gdk/macos/gdkmacosglcontext-private.h
gdk/macos/gdkmacosglcontext.c
gdk/macos/gdkmacossurface.c
gdk/wayland/gdkglcontext-wayland.c
gdk/wayland/gdkglcontext-wayland.h
gdk/wayland/gdksurface-wayland.c
gdk/win32/gdkglcontext-win32.c
gdk/win32/gdkglcontext-win32.h
gdk/win32/gdksurface-win32.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkglcontext-egl.c
gdk/x11/gdkglcontext-glx.c
gdk/x11/gdkglcontext-x11.c
gdk/x11/gdkglcontext-x11.h
gdk/x11/gdksurface-x11.c